<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .div1{
            height: 300px;
            background-color: #2c3e50;
            /*让包含快开启相对定位*/
            position: relative;
        }
        .div1 div{
            height: 50px;
            background-color: skyblue;
            /*此代码不可修改*/
            padding: 20px;
            /*此代码不可修改*/
            border:  10px solid black;
            /*让自己变成绝对定位*/
            position: absolute;
            left: 0;
            top: 0;
            right: 0;
        }
    </style>
</head>
<body>
<div class="div1">
    <div>aaa</div>
</div>
</body>
</html>